package general;

/**
 * A class that stores Two long values
 *
 */
public class TwoLongs implements Comparable<TwoLongs>{
	public long long1;
	public long long2;

	/**
	 * Creates an instance of TwoLongs
	 * @param long1 first integer
	 * @param long2 seconds integer
	 */
	public TwoLongs(long long1, long long2){
		this.long1 = long1;
		this.long2 = long2;
	}

	@Override
	public int compareTo(TwoLongs o) {
		if (this.long1 < o.long1){
			return -1; 
		} else if (this.long1 > o.long1){
			return 1;
		} else {
			if (this.long2 < o.long2){
				return -1; 
			} else if (this.long2 > o.long2){
				return 1;
			} else {
				return 0;
			}
		}
	}
	
	@Override
	public String toString() {
		return "<" + long1 + ", " + long2+">";
	}
}